import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/login'
import Home from '@/pages/home'
import Handle from '@/pages/handle'
import Record from '@/pages/record'
import RecordTable from '@/pages/handle/record-table'
import Linqi from '@/pages/linqi'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/',
      name: 'Home',
      component: Home,
      redirect: '/handle',
      children: [
        {
          path: 'handle',
          name: 'Handle',
          component: Handle,
          children: [
            {
              path: 'handle-record',
              name: 'RecordTable',
              component: RecordTable
            }
          ]
        },
        {
          path: 'record',
          name: 'Record',
          component: Record
        },
        {
          path: 'linqi',
          name: 'linqi',
          component: Linqi
        }
      ]
    }
  ]
})

export default router
